package com.glacier.demo.contoller;

import com.glacier.demo.domain.User;
import com.glacier.demo.service.UserService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * date 2024-01-29 20:45
 *
 * @author glacier
 * @version 1.0
 */
@Slf4j
@RestController
@RequestMapping("/user")
public class UserController {
    @Resource
    private UserService userService;

    @RequestMapping("findById")
    public User findById(Long id) {
        log.info("正常访问， id: {}", id);
        return userService.findById(id);
    }
}
